﻿#region 程序集 VanillaPsycastsExpanded, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null
// C:\code\MyMod\MOD\bin\this!!!!!!!1\1.4\Assemblies\VanillaPsycastsExpanded.dll
// Decompiled with ICSharpCode.Decompiler 7.1.0.6543
#endregion

using System.Collections.Generic;
using RI_Talisman;
using RimWorld;
using RimWorld.QuestGen;
using UnityEngine;
using Verse;

namespace WhoXiuXian
{
    public class RI_QuestNode_Root_Loot_AncientComplex_TalismakerWithCasket : QuestNode_Root_Loot_AncientComplex
    {
        protected override LayoutDef LayoutDef => RI_T_DefOfs.AncientComplex_Talismaker_LootWithCasket;

        protected override SitePartDef SitePartDef => RI_T_DefOfs.AncientComplex_TalismakerWithCasket;

        protected override void RunInt()
        {
            Slate slate = QuestGen.slate;
            if (!slate.TryGet<bool>("discovered", out var _))
            {
                slate.Set("discovered", var: false);
            }

            base.RunInt();
        }

        public new bool TryFindEnemyFaction(out Faction enemyFaction)
        {
            foreach (var faction2 in Find.FactionManager.AllFactionsListForReading)
            {
                if (faction2.def == RI_DefOf.RI_Faction_WickedCultivators)
                {
                    enemyFaction = faction2;
                    return enemyFaction != null;
                }
            }
            enemyFaction = null;
            return false;
        }
    }
}